<template>
	<view class="invest_list">
		<uv-navbar placeholder autoBack bgColor="#CA1C1D">
			<template v-slot:left>
				<view class="left_slot">
					<image src="@/static/images/back.png"></image>
				</view>
			</template>
			<template v-slot:center>
				<view class="nav_title">全部订单</view>
			</template>
		</uv-navbar>
		<scroll-view scroll-y class="scroll_view">
			<view class="list">
				<view class="item" v-for="item in _this.list"
					@click="router(`/pages/club/club_confirm_order_two?id=${item.id}`)">
					<uv-icon name="volume-fill" color="#CA1C1D" size="20"></uv-icon>
					<text>id:{{item.user.id}} 发起一笔订单</text>
				</view>
			</view>
		</scroll-view>
	</view>
</template>

<script setup>
	import {
		underwriteInvest
	} from "@/request/api";
	import useBase from "@/hooks/useBase.js";
	import useList from "@/hooks/useList.js";
	const {
		router
	} = useBase();
	const {
		_this
	} = useList();
	const getList = async () => {
		let {
			underwrite: list
		} = await underwriteInvest();
		_this.list = list;
	};
	getList()
</script>

<style scoped lang="scss">
	.invest_list {
		height: calc(100vh - var(--window-top) - var(--window-bottom));
		background: #f5f5f5;
		overflow: hidden;

		.left_slot {
			image {
				width: 43rpx;
				height: 36rpx;
			}
		}

		.nav_title {
			color: #F5F5F5;
			font-size: 36rpx;
		}

		.scroll_view {
			height: calc(100vh - var(--window-top) - var(--window-bottom) - #{$navBarHeight});
			background-color: #f5f5f5;

			.list {
				width: 100%;
				padding: 20rpx 20rpx 0;
				box-sizing: border-box;

				.item {
					width: 100%;
					height: 100rpx;
					border-radius: 6rpx;
					margin-bottom: 20rpx;
					padding: 0 20rpx;
					box-sizing: border-box;
					background-color: #fff;
					display: flex;
					justify-content: space-between;
					align-items: center;

					text {
						flex: 1;
						color: #111111;
						font-size: 32rpx;
						font-weight: bold;
						white-space: nowrap;
						text-overflow: ellipsis;
						overflow: hidden;
						padding-left: 5rpx;
						padding-right: 10rpx;
						box-sizing: border-box;
					}
				}
			}
		}
	}
</style>